import { request } from 'network/request.js'

export function getUserData(name, page, limit) {
  return request({
    url: '/user/getUser',
    params: {
      name,
      page,
      limit
    },
  })
}

export function deleteUser(id) {
  return request({
    url: '/user/del',
    params: {
      id
    }
  })
}

export function Batchremove() {
  return request({
    url: '/user/batchremove'
  })
}

export function createUser(data) {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/edit',
    method: 'post',
    data
  })
}

export function getHomeData() {
  return request({
    url: '/user/getData'
  })
}


